<?php

/**
 * This file is part of webman.
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the MIT-LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @author    walkor<walkor@workerman.net>
 * @copyright walkor<walkor@workerman.net>
 * @link      http://www.workerman.net/
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */

use Webman\Route;


Route::group('/api', function () {
    Route::get('/test', [app\api\controller\TestController::class, 'test']);
    Route::get('/latest', [app\api\controller\TestController::class, 'latest']);
    Route::get('/test/yztSocial', [app\api\controller\TestController::class, 'yztSocial']); # 一站通动态发布

    Route::group('/api', function () {});
    // deepseek对外服务
    Route::get('/ai', [app\api\controller\AiController::class, 'get']);
    // 生成用户动态
    Route::get('/user/dynamic', [app\api\controller\user\UserDynamicsController::class, 'dynamic']);

    # 测试自动发布信息
    Route::get('/test/user/dynamic/send', [app\api\controller\user\UserDynamicsController::class, 'dynamicSend']);

    // 谷歌地址转经纬度
    Route::get('/google/latlng', [app\api\controller\google\GoogleController::class, 'latlng']);

    // 谷歌翻译
    Route::get('/google/translate', [app\api\controller\google\GoogleController::class, 'translate']);

    // 汇率转换
    Route::get('/exchange/get', [app\api\controller\exchange\ExchangeController::class, 'get']);

    // 动态列表
    Route::get('/user/dynamics/list', [app\api\controller\user\UserDynamicsController::class, 'list']);
    // 修改动态
    Route::post('/user/dynamics/edit', [app\api\controller\user\UserDynamicsController::class, 'edit']);
    // 动态审核
    Route::post('/user/dynamics/audit', [app\api\controller\user\UserDynamicsController::class, 'audit']);

    // 越南新闻（中文）
    Route::get('/news/sync', [app\api\controller\news\VnNewsController::class, 'sync']);
});
